package com.glsc.ngateway.common.api.flowable.dto;

import com.glsc.ngateway.common.api.common.enums.PlatformConstant;
import com.glsc.ngateway.common.api.flowable.dto.param.DoTaskCommentDto;
import com.glsc.ngateway.common.api.flowable.resp.ResponseSituationDto;
import com.glsc.ngateway.common.api.flowable.dto.task.config.ProcessEditConfigDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;


/**
 * @author zzp
 * @date 2022/12/8
 * 流程任务通用TaskDto类
 */
@Data
public class FlowCommonTaskDto {

    @ApiModelProperty(value = "流程实例ID")
    protected String processId;

    @ApiModelProperty(value = "任务ID")
    protected String taskId;

    @ApiModelProperty(value = "流程类型")
    protected String processDefineKey;

    @ApiModelProperty(value = "任务处理节点标识，必填，如applyTask，即流程定义文件中的：userTask id=applyTask")
    protected String taskDefinitionKey;

    @ApiModelProperty(value = "评论附言")
    protected DoTaskCommentDto commentDto;

    @ApiModelProperty(value = "流程处理模式VIEW/EDIT，字典：am_flowable_handle_mode, VIEW/EDIT")
    protected String handleProcessMode = PlatformConstant.FLOWABLE_HANDLE_MODE_VIEW;

    @ApiModelProperty(value = "流程是否结束")
    protected String processEnd ="0";

    @ApiModelProperty(value = "当前节点状态信息")
    protected ResponseSituationDto currentTaskInfo = new ResponseSituationDto();

    @ApiModelProperty(value = "flowable流程信息，包含当前待处理节点等信息")
    protected ResponseSituationDto currentFlowableInfo = new ResponseSituationDto();

    @ApiModelProperty(value = "流程节点可编辑字段、退回等信息")
    protected ProcessEditConfigDto processEditConfigDto = new ProcessEditConfigDto();

    @ApiModelProperty(value = "进入草稿节点标识，如进入草稿此字段赋值常量beginTask")
    private String createToTaskDefinitionKey;

    /**
     * 草稿节点标识，如 createToTaskDefinitionKey="beginTask"，则创建流程后进入草稿状态
     */
    public static final String BEGIN_TASK = "beginTask";
}
